1. Field of the Invention
The present invention relates generally to an improved data processing system and more specifically to a method and apparatus for collecting data. Still more particularly, the illustrative embodiments provide a computer implemented method, apparatus, and computer program code for collecting performance data in a multithreaded data processing system.
2. Description of the Related Art
Effective management of a data processing system requires knowing how and when different resources within a data processing system are being used. In analyzing and enhancing the performance of a data processing system and applications executed within the data processing system, it is often useful to collect information about the execution of the applications within the data processing system. Performance tools have been used to monitor and examine a data processing system to identify resource consumption as various software applications execute on the data processing system.
For example, a performance tool may identify the most frequently used modules and instructions in a data processing system. A performance tool also may identify those modules which allocate the largest amount of memory, or those modules which perform the most input/output requests. Hardware based performance tools may be built into a data processing system and in some cases may be installed at a later time. Software based performance tools may generally be added to a data processing system at any time. This type of performance monitoring may be especially useful in multithreaded data processing systems.
A multithreaded data processing system is a data processing system in which multiple threads may execute. This type of execution may involve time division multiplexing or time slicing in which one or more processors switch between different threads. The context switching may occur quickly enough that an end user perceives the threads as executing simultaneously. With a multiprocessor or multicore system, multithreaded execution may be performed in which different threads may execute simultaneously on different processors or cores. Collection of performance data, in these types of systems, also uses resources on the data processing system. For example, memory and processing resources may be used to store and process the performance data. Often times, memory and processing resources may be limited. These limitations may occur because of a desire to avoid or reduce any impact on the performance of the data processing system.
Existing processes may perform performance monitoring via remote communication. For example, the data processing system in which performance data is collected may be sent to remote data processing systems for storage and analysis. One example is a remote debugger interface (RDI), which is a software debugger that can remotely connect to a data processing system to collect debugging information. Another example is Xdebug, which is a debugger for PHP scripts. These types of interfaces allow for the collection of stack traces, function traces, and error messages, as well as obtaining profiling information of the execution of applications.
These types of approaches, however, may be inefficient when monitoring multiple data processing systems. The transmission or streaming of data may require network resources that may slow down the performance of a network.